<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sijyp="http://java.sun.com/jsf/composite/sijyp">

	<h:panelGroup id="pg_fuente_tramite">
		<a4j:region id="rg_fuente_tramite">
			<sijyp:personasField prefixId="fteInfoTbc"
				id="buscador_persona_fteInfoTbc"
				disabled="#{managedBean.disabledAll}" value="#{dto.persona.nombre}"
				dto="#{dto.persona}" label="#{msgExh['exhumaciones.nombre']}*"
				required="true" render="fteInfoTbcPopupComponent"
				styleClass="long longPersona" />

			<h:panelGrid columns="3" columnClasses="col33,col33,col33"
				width="100%">
				<h:panelGrid>
					<h:outputLabel
						value="#{msgExh['exhumaciones.catalogo.tipo_documento']}:" />
					<h:selectOneMenu id="tipo_documento_fteInfoTbc" disabled="true"
						value="#{dto.persona.idTipoDocumentoDeIdentidad}">
						<f:selectItem itemLabel="Seleccione ..." itemValue="#{null}"
							noSelectionOption="true" />
						<f:selectItems
							value="#{managedBean.selectItemHelper.tipoDocumentoPersona}" />
					</h:selectOneMenu>
				</h:panelGrid>
				<h:panelGrid>
					<h:outputLabel
						value="#{msgExh['exhumaciones.diligencia.num_documento']}:" />
					<h:inputText id="num_documento_fteInfoTbc" disabled="true"
						value="#{dto.persona.numeroIdentificacion}">
					</h:inputText>
				</h:panelGrid>
				<h:column />
			</h:panelGrid>

			<h:panelGrid columns="3" columnClasses="col33,col33,col33"
				width="100%">
				<h:panelGrid>
					<h:outputLabel
						value="#{msgExh['exhumaciones.diligencia.num_tramite_beneficios']}*:" />
					<h:inputText id="num_tramite_tbc"
						disabled="#{managedBean.disabledAll}"
						value="#{dto.numeroTramiteBeneficios}"
						required="true"
						maxlength="21"
						requiredMessage="#{msgVal['constraint.not_null']}"
						validatorMessage="${msg['general.formatoNoValido']}">
						<f:validateRegex for="num_tramite_tbc" pattern="[0-9]*"/>
					</h:inputText>
					<h:message for="num_tramite_tbc" showSummary="true" showDetail="false"
								errorClass="validationErrorMessage" />
				</h:panelGrid>
				<h:panelGrid>
					<h:outputLabel
						value="#{msgExh['exhumaciones.diligencia.seleccional_justicia_permanente']}:" />
					<h:selectOneMenu id="seccional_justicia_tbc"
						disabled="#{managedBean.disabledAll}"
						value="#{dto.idSeccionalJusticiaPermanente}">
						<f:selectItem itemLabel="Seleccione ..." itemValue="#{null}"
							noSelectionOption="true" />
						<f:selectItems
							value="#{managedBean.selectItemHelper.justiciaPermanente}" />
					</h:selectOneMenu>
				</h:panelGrid>
				<h:panelGrid>
					<h:outputLabel
						value="#{msgExh['exhumaciones.diligencia.radicado']}*:" />
					<h:inputText id="radicado_tbc"
						value="#{dto.numeroRadicado}"
						disabled="#{managedBean.disabledAll}"
						required="true"
						maxlength="21" 
						requiredMessage="#{msgVal['constraint.not_null']}"
						validatorMessage="${msg['general.formatoNoValido']}">
						<f:validateRegex for="num_tramite_tbc" pattern="[0-9]*"/>
					</h:inputText>
					<h:message for="radicado_tbc" showSummary="true" showDetail="false"
						errorClass="validationErrorMessage" />
				</h:panelGrid>
			</h:panelGrid>

			<h:panelGroup style="text-align:center;" layout="block">
				<h:commandButton id="btn_fuenteinfo_tbc_adicionar"
					value="#{managedBean.fuenteInformacion.id == null ?  msgExh['exhumaciones.adicionar'] : msgExh['exhumaciones.actualizar']}"
					rendered="#{!managedBean.disabledAll}"
					action="#{managedBean.guardar(managedBean.fuenteInformacion.id, managedBean.fuenteInformacion)}">
					<a4j:ajax  render="pg_fuente_informacion nombreInterno" execute="@region" />
				</h:commandButton>
				<h:commandButton
					id="btn_fuenteinfo_tbc_cancelar"
					value="#{msgExh['exhumaciones.cancelar']}"
					action="#{managedBean.cancelar()}" 
					immediate="true"
					disabled="#{diligenciaRegistrarCaso.estado == 'VER'}">
					<f:ajax render="pg_fuente_informacion" immediate="true" />
				</h:commandButton>
			</h:panelGroup>
		</a4j:region>
	</h:panelGroup>

</ui:composition>